:root {
  --border-width: 5px;
}
body {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #ccc;
}

.container {
  width: 220px;
  height: 50px;
  border-radius: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #ccc;
  z-index: -2;
  overflow: hidden;
}

.item {
  position: relative;
  font-size: 16px;
  width: calc(100% - var(--border-width) * 2);
  height: calc(100% - var(--border-width) * 2);
  background: linear-gradient(to right, #ff7675, #e84393);
  border-radius: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.item::after {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  background: linear-gradient(90deg, #fff, #6c5ce7 60%);
  z-index: -1;
  animation: anim 2s linear infinite;
}

@keyframes anim {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
